﻿using AppMain;
using System;
using System.Collections.Generic;
using System.Text;

namespace BehaviorTree
{
    public class BMonsterSayAction : BTAction
    {
        public BMonsterSayAction(ActionRole agent) : base(agent)
        {
        }

        float time = 0;
        public override Node_Status tick(float frameTime)
        {
            this.agent.AttrMap.getAttr<float>(RoleAttr.RestTime).Value += frameTime;
            time += frameTime;
            if (time >= 9f)
            {
                agent.say("休息足够,巡逻！ 外币外币！");
                time = 0;
                return Node_Status.Success;
            }
            else
            {
                return Node_Status.Running;
            }
        }


    }
}
